#include <stdio.h>
#include <time.h>

// 1970 1 1 0 0 0
int main()
{
    time_t rawtime;
    struct tm * timeinfo;
    //    time (&rawtime);
    rawtime = time(NULL);
    timeinfo = localtime(&rawtime);

    //    printf("%s\n",asctime(timeinfo));
    printf("Year : %d\n",timeinfo -> tm_year+1900);
    printf("Month: %d\n",timeinfo -> tm_mon+1);
    printf("Day  : %d\n",timeinfo -> tm_mday);

    printf("Hour : %d\n",timeinfo -> tm_hour);
    printf("Min  : %d\n",timeinfo -> tm_min);
    printf("Sec  : %d\n",timeinfo -> tm_sec);
    return 0;
}
